import axios from "@/api/myaxios";

let BASE_API="/api/permission/"

let permissionApi={
    getAll(){
        return axios.get(BASE_API+"/all")
    },
    insert(permission){
        return axios.post(BASE_API+"/add",permission)
    },
    updateRolePermission(rolePermission){
        return axios.post(BASE_API+"/role/update",rolePermission)
    },
    getListByRoleId(roleId){
        return axios.get(BASE_API+"list/role?roleId="+roleId)
    },
    update(permission){
        return axios.post(BASE_API+"/update",permission)
    }
}

export default permissionApi;